A
last analyzed

Complexity

Conditions 1

Size

Total Lines 16
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 16
rs 9.65
c 0
b 0
f 0
cc 1
1
import { DependencyNode, NodeSelection } from '../../components/types';
2
import { Selection } from 'd3-selection';
3
import { Colors, ElementIds } from '../../utils/AppConsts';
4
5
export function createHighlightBackground(
6
    svgContainer: NodeSelection<SVGGElement>
7
): Selection<SVGRectElement, DependencyNode, Element, HTMLElement> {
8
    return svgContainer
9
        .append('rect')
10
        .attr('id', ElementIds.HIGHLIGHT_BACKGROUND)
11
        .attr('data-test-id', 'highlight-background')
12
        .attr('width', 0)
13
        .attr('height', 0)
14
        .attr('x', 0)
15
        .attr('y', 0)
16
        .attr('rx', 5)
17
        .attr('ry', 5)
18
        .attr('fill', Colors.BLUE_GREY)
19
        .style('opacity', 0);
20
}
21